package com.hyzx.qbasic.admin.domain.dao;

import com.hyzx.qbasic.admin.model.po.ProcessInstancePO;
import com.hyzx.qbasic.admin.model.po.ProcessTaskInstancePO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProcessInstanceMapper {
    int addProcessInstance(ProcessInstancePO processInstance);

    int addProcessInstanceTask(ProcessTaskInstancePO task);

    ProcessInstancePO getProcessInstance(@Param("processInstanceId") int processInstanceId);

    ProcessInstancePO getProcessInstanceByBusinessKey(@Param("businessKey") String businessKey);

    int editProcessInstance(ProcessInstancePO processInstance);

    int deleteProcessInstance(@Param("businessKey") String businessKey);

    int batchDeleteProcessInstance(List<String> businessKeyList);

    ProcessTaskInstancePO getProcessTaskInstance(@Param("taskInstanceId") int taskInstanceId);

    int editProcessTaskInstance(ProcessTaskInstancePO taskInstance);

    List<ProcessTaskInstancePO> getProcessTaskInstanceByBusinessKey(@Param("businessKey") String businessKey);
}